.upload-container {
  padding: 20px;
  min-height: 100vh;
  background: #f5f7fa;

  .loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #909399;
  }

  .upload-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;

    .title {
      font-size: 24px;
      color: #303133;
      margin-bottom: 32px;
      text-align: center;
      font-weight: 600;
      position: relative;
      padding-bottom: 16px;

      &:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: #409eff;
        border-radius: 2px;
      }
    }

    .student-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 20px;
      margin-top: 24px;

      .student-card {
        background: #fff;
        border: 1px solid #ebeef5;
        border-radius: 8px;
        padding: 20px;
        cursor: pointer;
        transition: all 0.3s;

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
          border-color: #409eff;
        }

        .student-info {
          h3 {
            margin: 0 0 12px;
            color: #303133;
            font-size: 16px;
            font-weight: 500;
          }

          .info-row {
            display: flex;
            justify-content: space-between;
            color: #606266;
            font-size: 14px;
            margin-bottom: 8px;

            &:last-child {
              margin-bottom: 0;
            }
          }
        }
      }
    }

    .selected-student {
      background: #f0f9eb;
      color: #67c23a;
      padding: 12px 16px;
      border-radius: 4px;
      margin-bottom: 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .change-student {
        background: none;
        border: 1px solid #67c23a;
        color: #67c23a;
        padding: 4px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.3s;

        &:hover {
          background: #67c23a;
          color: white;
        }
      }
    }

    .upload-form {
      width: 100%;
      max-width: 800px;
      margin: 0 auto;
      
      .form-section {
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid #ebeef5;
        width: 100%;

        &:last-child {
          border-bottom: none;
          margin-bottom: 0;
          padding-bottom: 0;
        }

        .section-title {
          font-size: 16px;
          color: #409eff;
          margin-bottom: 20px;
          font-weight: 500;
        }

        .form-row {
          width: 100%;
          display: grid;
          grid-template-columns: 1fr;
          gap: 20px;
          margin-bottom: 20px;

          &.full-width {
            grid-template-columns: 1fr;
          }
        }
      }

      .form-group {
        width: 100%;
        margin-bottom: 20px;

        &:last-child {
          margin-bottom: 0;
        }

        label {
          display: block;
          margin-bottom: 8px;
          color: #606266;
          font-weight: 500;
          font-size: 14px;

          .required {
            color: #f56c6c;
            margin-left: 4px;
          }
        }

        input, 
        textarea,
        select {
          width: 100%;
          box-sizing: border-box;
          padding: 10px 12px;
          border: 1px solid #dcdfe6;
          border-radius: 4px;
          outline: none;
          transition: all 0.3s;
          font-size: 14px;
          color: #606266;
          background-color: #fff;

          &:hover {
            border-color: #c0c4cc;
          }

          &:focus {
            border-color: #409eff;
            box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
          }

          &::placeholder {
            color: #c0c4cc;
          }

          &.error {
            border-color: #f56c6c;
            
            &:focus {
              box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.1);
            }
          }
        }

        textarea {
          min-height: 120px;
          resize: vertical;
          line-height: 1.6;
        }

        select {
          cursor: pointer;
          padding-right: 30px;
          appearance: none;
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23606266'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
          background-repeat: no-repeat;
          background-position: right 8px center;
          background-size: 16px;
        }

        .error-message {
          color: #f56c6c;
          font-size: 12px;
          margin-top: 6px;
          display: block;
        }
      }

      .form-footer {
        margin-top: 40px;
        display: flex;
        justify-content: center;
        gap: 16px;

        button {
          padding: 12px 36px;
          border-radius: 4px;
          border: none;
          cursor: pointer;
          font-size: 14px;
          transition: all 0.3s;
          font-weight: 500;

          &.submit-btn {
            background: #409eff;
            color: white;

            &:hover {
              background: #66b1ff;
            }

            &:active {
              background: #3a8ee6;
            }
          }

          &.cancel-btn {
            background: #fff;
            color: #606266;
            border: 1px solid #dcdfe6;

            &:hover {
              color: #409eff;
              border-color: #c6e2ff;
              background-color: #ecf5ff;
            }

            &:active {
              color: #3a8ee6;
            }
          }
        }
      }
    }
  }
}

// 响应式设计
@media screen and (max-width: 768px) {
  .upload-container {
    padding: 12px;

    .upload-card {
      padding: 20px;

      .title {
        font-size: 20px;
        margin-bottom: 24px;
      }

      .student-list {
        grid-template-columns: 1fr;
      }

      .upload-form {
        .form-section {
          margin-bottom: 24px;
          padding-bottom: 16px;

          .form-row {
            grid-template-columns: 1fr;
            gap: 16px;
          }
        }

        .form-group {
          margin-bottom: 16px;

          input, 
          textarea,
          select {
            padding: 8px 12px;
          }
        }

        .form-footer {
          margin-top: 32px;
          flex-direction: column-reverse;
          
          button {
            width: 100%;
            padding: 10px 24px;
          }
        }
      }
    }
  }
}